﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using DAL;
namespace BLL
{
   public  class wuyiBLL
    {
        wuyiDAL wdl = new wuyiDAL();
        public DataTable wuyishow()   //显示物遗表的dgv
        {
            string sql = string.Format("select * from wuyi");
            return wdl.wuyishow();
        }
        public DataTable cxwuyi(string wuyiname,int wuyiall ,int wuyitake)  //物遗模糊查询
        {

            return wdl.cxwuyi(wuyiname, wuyiall,wuyitake);
        }
        public bool wuyiAdd(string yname, string pickplace, string pickuname, string pickutel, string Ctime, string Cstatus)   //添加物遗表的dgv
        {
            
            int a= wdl.wuyiAdd(yname, pickplace, pickuname, pickutel, Ctime,Cstatus);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public bool wuyimodify(string yname, string pickplace, string pickuname, string pickutel, string Ctime, string Cstatus, int id)
        {
            
            int a = wdl.wuyimodify(yname, pickplace, pickuname, pickutel, Ctime, Cstatus,id);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }

        }
        public DataTable wumodifyShow(int id)    //用户的修改赋值去主页面
        {
            return wdl.wumodifyShow(id);
        }
        public bool wydel(int id)    // 删除物遗
        {

            int a = wdl.wydel(id);
            if (a > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
